0 Rank - Balanced Trees
نویسندگان
چکیده
Since the invention of AVL trees in 1962, many kinds of binary search trees have been proposed. Notable are red-black trees, in which bottom-up rebalancing after an insertion or deletion takes O(1) amortized time and O(1) rotations worst-case. But the design space of balanced trees has not been fully explored. We continue the exploration. Our contributions are three. We systematically study the use of ranks and rank differences to define height-based balance in binary trees. Different invariants on rank differences yield AVL trees, red-black trees, and other kinds of balanced trees. By relaxing AVL trees, we obtain a new kind of balanced binary tree, the weak AVL tree, abbreviated wavl tree, whose properties we develop. Bottom-up rebalancing after an insertion or deletion takes O(1) amortized time and at most two rotations, improving the three or more rotations per deletion needed in all other kinds of balanced trees of which we are aware. The height bound of a wavl tree degrades gracefully from that of an AVL tree as the number of deletions increases, and is never worse than that of a red-black tree. Wavl trees also support top-down, fixed look-ahead rebalancing in O(1) amortized time. Finally, we use exponential potential functions to prove that in wavl trees rebalancing steps occur exponentially infrequently in rank. Thus most of the rebalancing is at the bottom of the tree, which is crucial in concurrent applications and in those in which rotations take time that depends on the subtree size.
منابع مشابه
On the Average Height of b-Balanced Ordered Trees
An ordered tree with height h is b-balanced if all its leaves have a level l with h − b <= l <= h, where at least one leaf has a level equal to h − b. For large n, we shall compute asymptotic equivalents to the number of all b-balanced ordered trees with n nodes and of all such trees with height h. Furthermore, assuming that all b-balanced ordered trees with n nodes are equally likely, we shall...
متن کاملLower Bounds on Quantum Query Complexity for Read-Once Decision Trees with Parity Nodes
We introduce a complexity measure for decision trees called the soft rank, which measures how wellbalanced a given tree is. The soft rank is a somehow relaxed variant of the rank. Among all decision trees of depth d, the complete binary decision tree (the most balanced tree) has maximum soft rank d, the decision list (the most unbalanced tree) has minimum soft rank √ d, and any other trees have...
متن کاملTraining Efficient Tree-Based Models for Document Ranking
Gradient-boosted regression trees (GBRTs) have proven to be an effective solution to the learning-to-rank problem. This work proposes and evaluates techniques for training GBRTs that have efficient runtime characteristics. Our approach is based on the simple idea that compact, shallow, and balanced trees yield faster predictions: thus, it makes sense to incorporate some notion of execution cost...
متن کاملA New Weight Balanced Binary Search Tree 1
We develop a new class of weight balanced binary search trees called-balanced binary search trees (-BBSTs).-BBSTs are designed to have reduced internal path length. As a result, they are expected to exhibit good search time characteristics. Individual search, insert, and delete operations in an n node-BBST take O(log n) time for 0 < p 2?1. Experimental results comparing the performance of-BBSTs...
متن کاملEla Minimum Rank of Powers of Trees
The minimum rank of a simple graph G over a field F is the smallest possible rank among all real symmetric matrices, over F, whose (i, j)-entry (for i 6= j) is nonzero whenever ij is an edge in G and is zero otherwise. In this paper, the problem of minimum rank of (strict) powers of trees is studied.
متن کامل